/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WmsMoOrder extends BasicModel<WmsMoOrder> {
  modid?: string; // modid
  moid?: string; // moid
  mocode?: string; // 订单编号
  sortseq?: number; // 行号
  ddate?: string; // 单据日期
  invcode?: string; // 存货编码
  mdeptcode?: string; // 部门编码
  mdeptname?: string; // 部门名称
  qty?: string; // 数量
  mostatus?: number; // 状态
  llstatus?: string; // 领料状态
  startdate?: string; // 开始日期
  duedate?: string; // 结束日期
}

export const wmsMoOrderList = (params?: WmsMoOrder | any) =>
  defHttp.get<WmsMoOrder>({ url: adminPath + '/mo/order/wmsMoOrder/list', params });

export const wmsMoOrderListData = (params?: WmsMoOrder | any) =>
  defHttp.post<Page<WmsMoOrder>>({ url: adminPath + '/mo/order/wmsMoOrder/listData', params });

export const wmsMoOrderListDataByStaus = (params?: WmsMoOrder | any) =>
  defHttp.post<Page<WmsMoOrder>>({
    url: adminPath + '/mo/order/wmsMoOrder/listDataByStatus',
    params,
  });

export const wmsMoOrderListDataByRkStaus = (params?: WmsMoOrder | any) =>
  defHttp.post<Page<WmsMoOrder>>({
    url: adminPath + '/mo/order/wmsMoOrder/listDataByRkStatus',
    params,
  });

export const wmsMoOrderListDataByStatus = (params?: WmsMoOrder | any) =>
  defHttp.post<Page<WmsMoOrder>>({
    url: adminPath + '/mo/order/wmsMoOrder/listDataByStatus',
    params,
  });

export const wmsMoOrderForm = (params?: WmsMoOrder | any) =>
  defHttp.get<WmsMoOrder>({ url: adminPath + '/mo/order/wmsMoOrder/form', params });

export const wmsMoOrderSave = (params?: any, data?: WmsMoOrder | any) =>
  defHttp.postJson<WmsMoOrder>({ url: adminPath + '/mo/order/wmsMoOrder/save', params, data });

export const wmsMoOrderDelete = (params?: WmsMoOrder | any) =>
  defHttp.get<WmsMoOrder>({ url: adminPath + '/mo/order/wmsMoOrder/delete', params });
